package com.cweb.admin.model.bbs.bbs_comment_info.controller;


import com.cweb.admin.configuration.annotation.NoLoginCheck;
import com.cweb.admin.model.bbs.bbs_comment_info.entity.BbsCommentInfo;
import com.cweb.admin.model.bbs.bbs_comment_info.service.BbsCommentInfoService;
import com.cweb.framework.annotation.Remark;
import com.cweb.framework.pojo.BaseResponse;
import com.cweb.framework.pojo.CustomException;
import com.cweb.framework.pojo.PageParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.cweb.framework.base.controller.BaseController;

/**
 * 论坛-评论信息 前端控制器
 * @author changfan
 */
@RestController
@RequestMapping("bbs/comment")
public class BbsCommentInfoController extends BaseController {
    @Autowired
    private BbsCommentInfoService bbsCommentInfoService;

    /**
     * 新增评论
     */
    @RequestMapping("make")
    @Remark(name = "用户新建文章", describe = "")
    public BaseResponse make(BbsCommentInfo param) throws CustomException {
        return new BaseResponse(bbsCommentInfoService.make(param));
    }
    /**
     * 评论列表取得
     */
    @RequestMapping("list")
    @Remark(name = "查询文章列表", describe = "")
    @NoLoginCheck
    public BaseResponse list(BbsCommentInfo param, PageParam pageParam) throws CustomException {
        return new BaseResponse(bbsCommentInfoService.getList(param, pageParam));
    }
}

